﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YinLong.Tool.Net.HttpHelperMin;

namespace Nucleic.Core.Utils.hebcz
{
    public class hebczUtil
    {
        //http://nontax.hebcz.cn/static/esq?ec=票据代码&en=票据号码&rn=校验码
        /// <summary>
        /// 5.1获取开票状态信息
        /// </summary>
        public static ReturnData<MeInvoiceStatusDto> invoicestatus(string bizcode)
        {
            HttpHelperMin http = new HttpHelperMin();
            HttpItemMin httpitem = new HttpItemMin()
            {
                URL = "http://10.10.20.20:7991/search/meinvoicestatus",
                Method = "POST",
                ContentType = "application/json",
                Postdata = JsonConvert.SerializeObject(new MeInvoiceStatus { bizcode = bizcode }),
            };
            var resule = http.GetHtml(httpitem);
            var invStatus = JsonConvert.DeserializeObject<ReturnData<MeInvoiceStatusDto>>(resule.Html);
            return invStatus;
        }
        public void mkomedicaleinvoice()
        {
            HttpHelperMin http = new HttpHelperMin();
            HttpItemMin item = new HttpItemMin()
            {
                Method="POST",
                ContentType= "application/json",

            };

        }
    }
}
